home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / Prog / A / AE Sample (TC5) / AESimple.h next >
Encoding:
C/C++ Source or Header  |  1992-01-07  |  1.5 KB  |  79 lines  |  [TEXT/KAHL]

  1. /* File: AESimple.h */
  2. #ifndef __PRINTING__
  3. #include <printing.h>
  4. #endif
  5.  
  6. #ifndef __APPLEEVENTS__
  7. #include <AppleEvents.h>
  8. #endif
  9.  
  10. #ifndef __GESTALTEQU__
  11. #include <GestaltEqu.h>
  12. #endif
  13.  
  14.  
  15. #define    kAppleMenu    1001
  16. enum    {
  17.             cAbout = 1
  18.         };
  19.  
  20. #define    kFileMenu    1002
  21. enum    {
  22.             cNew = 1,
  23.             cOpen,
  24.             cClose,
  25.             /* --- */
  26.             cSave = 5,
  27.             cSaveAs,
  28.             /* --- */
  29.             cPageSetup = 8,
  30.             cPrint,
  31.             /* --- */
  32.             cQuit = 11
  33.         };
  34.  
  35. #define    kEditMenu    1003
  36.  
  37. #define kDemoMenu    1004
  38.  
  39. #define    kDisplayWindow    1001
  40. #define    kAboutDialog    1001
  41.  
  42.  
  43.         /* Other magic numbers */
  44. #ifndef nil
  45.     #define    nil                (0L)
  46. #endif
  47.  
  48. #ifndef NIL
  49.     #define    NIL                (0L)
  50. #endif
  51. typedef    unsigned long ulong;
  52. typedef unsigned short ushort;
  53.  
  54.  
  55. typedef struct {
  56.             OSType    identifier;                /* This is a 4-letter code which makes it easier to find the block in memory */
  57.             FSSpec    theFile;
  58.             THPrint    printInfo;
  59.             PicHandle thePicture;            /* The picture to be drawn */
  60.             Rect    picBounds;                /* The frame within which our picture sits */
  61.             short    currVScrollValue;        /* How far have we scrolled vertically */
  62.             short    currHScrollValue;        /* How far have we scrolled horizontally */
  63.             ControlHandle vScrollHand;        /* vertical scroll bar */
  64.             ControlHandle hScrollHand;        /* horizontal scroll bar */
  65.         } WindowInfo, *wiPtr, **wiHand;
  66.  
  67. #ifdef __Main__
  68.     #define    global
  69. #else
  70.     #define    global    extern
  71. #endif
  72.  
  73. global    Boolean    gDone;                  /*    quit program flag    */
  74. global    short    gMenuState;                /* In what state did we last leave our menu bar? */
  75.  
  76. #define        isUserWindow(wp)    (((WindowPeek)wp)->windowKind == userKind)
  77.  
  78. #include    "Prototypes.h"
  79.